<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="css/estilos.css"/>	
</head>
<body>

<f:view>		
		<h:form>		
		<table width="300px">
			<tr>
				<td colspan="2" class="login">LOGIN</td>
			</tr>
			<tr>
				<td>Usuario</td>
				<td>
					<h:inputText id="userName" value="#{userBean.user}" >
						<f:validateLength minimum="5"/>
					</h:inputText>
					<h:message for="userName"/>
				</td>
			</tr>
			<tr>
				<td>Password</td>
				<td>
					<h:inputText id="password" value="#{userBean.password}" validator="#{userBean.validaPassword}" />
					<h:message for="password"/>
				</td>
			</tr>
			<tr>
				<td>Mail</td>
				<td>
					<h:inputText id="mail"> 
						<f:validator validatorId="emailValidator"/>						
					</h:inputText>
					<h:message for="mail"/>
				</td>
			</tr>	
			<tr>
				<td colspan="2" align="center">
					<h:commandButton action="#{userBean.doLogin}" value="Enter"/>
				</td>
			</tr>
		</table>
		</h:form>
</f:view>		

</body>
</html>